<template>
  <div id="Lunbo" class="wrap">
    <div class="wrap_head" :class="dataList.length !== 0 ? 'wrap_head_bg' : ''">
      <span v-if="dataList.length !== 0">异常督办 {{ dataList.length }}</span>
      <!-- <span v-if="abnormalNum !== 0"></span> -->
    </div>
    <div class="wrap_content">
      <div
        class="bgWrap"
        :class="dataList.length === 0 ? 'coverred' : 'coverred'"
        style="padding: 5px 0px 0;"
      >
        <div
          v-if="dataList.length === 0"
          class="noTask"
          :style="{
						height: '100%',
						color: '#50e3c2',
						textAlign: 'center'
					}"
        >
          <div class="noTaskCon">无异常督办信息</div>
        </div>
        <el-carousel v-else trigger="click" arrow="never" style="height:100%">
          <el-carousel-item v-for="(item, index) in dataList" :key="index">
            <div class="itemWrap">
              <el-row :gutter="24">
                <el-col class="item1" :span="8">企业：</el-col>
                <el-col class="item2" :span="14">{{item.enterprise}}</el-col>
              </el-row>
              <el-row :gutter="24">
                <el-col class="item1" :span="8">安装位置：</el-col>
                <el-col class="item2" :span="14">{{item.installationLocation}}</el-col>
              </el-row>
              <el-row :gutter="24">
                <el-col class="item1" :span="8">用源设备：</el-col>
                <el-col class="item2" :span="14">{{item.radUsedName}}</el-col>
              </el-row>
              <el-row :gutter="24">
                <el-col class="item1" :span="8">异常类型：</el-col>
                <el-col class="item2" :span="14">{{item.abnormalType}}</el-col>
              </el-row>
              <el-row :gutter="24">
                <el-col class="item1" :span="8">异常发生时间：</el-col>
                <el-col class="item2" :span="14">{{item.happenTime}}</el-col>
              </el-row>
            </div>
          </el-carousel-item>
        </el-carousel>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    abnormalNum: {
      // 督办数量
      type: Number,
      default: 0
    },
    width: {
      type: String,
      default: "220px"
    },
    height: {
      type: String,
      default: "115px"
    },
    dataList: {
      type: Array,
      default: function() {
        return []
      }
    }
  },
  data() {
    return {};
  },
  mounted() {},
  beforeDestroy() {},
  methods: {}
};
</script>
<style type="text/css" lang="scss" scoped>
$winMaxWidth: 1360px;
$winMinWidth: 1440px;

.wrap {
  height: 100%;
  .wrap_head {
    // padding: 0 5px 10px;
    color: #f43333;
    height: 25px;
    line-height: 25px;
    text-align: right;
    font-weight: 500;
    padding-right: 10px;
    position: relative;
    span:nth-child(1) {
      font-size: 16px;
    }
    span:nth-child(2) {
      padding-right: 5px;
      font-size: 18px;
      display: inline-block;
      width: 25px;
      line-height: 25px;
      position: relative;
      top: 2px;
    }
  }
  .wrap_head_bg {
    background: url("~@/assets/info_images/warning.png") no-repeat;
    background-size: contain;
    background-position: 78% -3px;
  }
  .wrap_content {
    // height: calc(100% - 25px);
    // padding: 20px 28px;
    @media screen and (max-width: $winMaxWidth) {
      height: 229px;
    }
    @media screen and (min-width: $winMaxWidth) and (max-width: $winMinWidth) {
      height: 209px;
    }
    height: 158px; // calc(100% - 50px)
    display: flex;
    justify-content: space-around;
    overflow: hidden;
    padding-left: 12px;
    padding-right: 12px;

    .bgWrap {
      width: 100%;
      height: 100%;
      overflow: hidden;
      .noTask {
        font-size: 12px;
        font-weight: 600;
        position: relative;
        background: url("~@/assets/info_images/handle.png") no-repeat;
        background-size: 60px 60px;
        background-position: 30% 50%;
        .noTaskCon {
          position: absolute;
          left: 50%;
          top: 50%;
          /* 这里有兼容性问题 */
          -webkit-transform: translateY(-50%);
          -ms-transform: translateY(-50%);
          -o-transform: translateY(-50%);
          transform: translateY(-50%);
        }
      }
      .itemWrap {
        line-height: 25px;

        // margin-bottom: 5px;
        &:nth-child(1) {
          // margin-top:8px;
        }
        .item1 {
          font-size: 10px;
          text-align: right;
          color: #fff;
          padding: 0 !important;
          line-height: 28px;
          @media screen and (max-width: $winMaxWidth) {
            line-height: 34px;
          }
          @media screen and (min-width: $winMaxWidth) and (max-width: $winMinWidth) {
            line-height: 34px;
          }
        }
        .item2 {
          font-size: 10px;
          text-align: left;
          color: #fff;
          padding: 0 !important;
          text-indent: 15px;
          line-height: 28px;
          @media screen and (max-width: $winMaxWidth) {
            line-height: 34px;
          }
          @media screen and (min-width: $winMaxWidth) and (max-width: $winMinWidth) {
            line-height: 34px;
          }
        }
      }
      margin-bottom: 10px;
    }
    .bgWrap1 {
      // background: url("~@/assets/info_images/abn_blue_bg.png") no-repeat;
      // @include bacgroundImg(
      //               "~@/assets/info_images/abn_red_bg.png"
      //           );
    }
    .bgWrap2 {
      // background: url("~@/assets/info_images/abn_red_bg.png") no-repeat;
      // @include bacgroundImg(
      //               "~@/assets/info_images/abn_red_bg.png"
      //           );
    }
  }
}
</style>
<style lang="scss">
#Lunbo {
  .el-carousel__indicators {
    width: 140px;

    .el-carousel__indicator {
      width: 40px;
    }
  }
}
.el-carousel--horizontal {
  overflow: hidden;
}
.el-carousel__indicators--horizontal {
  // display:none !important;
  // width: 4px;
  // height: 4px;
  padding-left: 5px;
  padding-right: 5px;

  li {
    width: 4px;
    height: 4px;
    border-radius: 50%;

    .el-carousel__button {
      width: 4px;
      height: 4px;
      border-radius: 50%;
    }
  }
  li.is-active {
    width: 4px !important;
    height: 4px !important;
    border-radius: 50% !important;

    button.el-carousel__button {
      width: 4px !important;
      height: 4px !important;
      border-radius: 50% !important;
      background-color: #f43333;
    }
  }
}
.el-carousel__container {
  height: 100%;
}
/* .is-active{
  width: 15px;
} */
</style>
